// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.2 OR LicenseRef-Slint-commercial

 export component TestCase  {
    property <int> int_value: 42;

    property <string> t1: @tr("Hello World{{}}.");
    property <string> t2: @tr("Hello {}.", "World");
    property <string> t3: @tr("{} Hello {}", int_value, "World");
    property <string> t4: @tr("{1} Hello {0}🌍", @tr("World"), int_value + 1);

    property <string> c1: @tr("Context" => "xx{0}xx", @tr("CC" => "aa"));

    function make_plural1(xx: int, yy: string) -> string { return @tr("there is one file in my {}" | "there are {n} files in my {}" % xx, yy); }
    function make_plural2(xx: int) -> string { return @tr("Ctx=>" => "xx{n}xx" | "yy" % xx); }

    out property <bool> test: t1 == "Hello World{}." && t2 == "Hello World." && t3 == "42 Hello World" && t4 == "43 Hello World🌍"
        && c1 == "xxaaxx"
        && make_plural1(1, @tr("Plop")) == "there is one file in my Plop" && make_plural1(10, @tr("Flop")) == "there are 10 files in my Flop"
        && make_plural2(1) == "xx1xx" && make_plural2(-999) == "yy";
}
/*
```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert(instance.get_test());
```


```rust
let instance = TestCase::new().unwrap();
assert!(instance.get_test());
```

```js
var instance = new slint.TestCase({});
assert(instance.test);
```
*/
